let obj =
    object(self)
        method a = 1
        method b = 2
    end;;

let num = ref 0;;

let rec loop i =
    num := !num + obj#a + obj#b;
    if (i > 0) then
        loop (i - 1);;

loop 1000000;;

print_int !num;;
print_string "\n";;
